<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!--只在模块名下面有效 -->
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui"%>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>操作日志</title>
<jsp:include page="../../import.jsp" flush="true" />
<style>
.visit_rec_detail_win {
	text-align: left !important;
	padding: 10px 25px 25px 25px;
}
</style>
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div id="ligergridDB" class="sq-grid"></div>
	</div>	

	<script type="text/javascript">
		var gridDB = null;
		var pageInApp = {}; // to 下一级子窗口 接口
		var queryFlag = '${queryFlag}'; //只查询列表
		var pageInTab = null;
		var loadedTabs = [];
		$(function() {
			initTab();
			initGridDB(); //初始化待办列表
			$("#searchBar").ligerForm();
			$("#searchBtn").click(function(event) {
				reloadGrid();
			});
			$('#closeAttachmentsView').click(function() {
				closeAttachmentsView();
			});
		});
	
		//重新加载GRID
		function reloadGrid() {
			var form = new liger.get("searchBar");
			var data = form.getData();
			for (name in data) {
				console.log('name:' + name + ',data:' + data[name]);
				gridDB.setParm(name, data[name]);
			}
			;
			gridDB.reload();
		}
	
		//初始化列表
		function initGridDB() {
			$("#ligergridDB").ligerGrid({
				url : '<%=path%>/spl/splRelOpLog/initList.do?dataId=${dataId}&bizTypCd=${bizTypCd}',
				method : 'get',
				columns : [
					{
						display : '操作事项',
						name : 'riskSign',
						width : 80,
						enabledSort : false
					},
                    {
                        display : '标记类型',
                        name : 'opTypCdNm',
                        width : 80,
                        enabledSort : false
                    },
                    {
                        display : '标记原因',
                        name : 'signDescNm',
                        minWidth : 80,
                        enabledSort : false
                    },
					{
						display : '操作原因',
						name : 'opDesc',
						minWidth : 150,
						enabledSort : false
					},
                    {
                        display : '操作时间',
                        name : 'crtTm',
                        minWidth : 100,
                        render : function(rowdata, index, value){
                            return renderDate2(rowdata, index, value);
                        }
                    },
					{
						display : '操作人',
						name : 'crtUsrName',
						minWidth : 80,
						enabledSort : false
					}
				],
				pageSize : 10,
				pageSizeOptions : [ 10, 20, 30, 40, 50, 100 ], //按照自己的喜好选择不同的页面显示条数
				root : 'rows',
				record : 'total',
				hideLoadButton : true,
				width : '100%',
				height : '100%',
				heightDiff : -30,
				//checkbox : true,
				rownumbers : true,
				onAfterShowData : function() {
					$(".gridTip").grid_ligerTip();
					SetIframe_height();
				}
			});
			gridDB = liger.get("ligergridDB");
			gridDB.setHeight(100);
			gridDB.options.isSingleCheck = true;
		}
	
		//格式化时间
		function renderDate2(rowdata, index, value) {
			var dateStr = "";
			if (null != value) {
				var date = new Date(value);
				dateStr = DateUtils.formatDate(date, "yyyy-MM-dd");
			}
			return dateStr;
		}
	
		function clearBtn() {
			clearLigerForm("searchBar");
			liger.get("buOrgCd").clear();//清空树
		}
	
		function iframeResize() {
			if (parent.mainApp) {
				parent.mainApp.parentTab.onResize();
			}
			;
		}
	
		//初始化Tab页
		function initTab() {
			pageInTab = $("#pageInTab").ligerTab({
				height : 'auto',
				contextmenu : false,
				minIframeHeight : GET_minIframeHeight(),
				onAfterSelectTabItem : function(tabid) {
					currTab = tabid; //赋值是哪个Tab页面
					if (loadedTabs.indexOf(tabid) < 0) {
						loadedTabs.push(tabid);
						switch (tabid) {
						case "tabB":
							pageInTab.setTabItemSrc(tabid, "<%=path%>/bizflow/rskUsrAchLog/toMyAchievementsPage.do");
							break;
						}
					}
					;
					SetIframe_height();
				}
			});
	
			$.extend(true, pageInApp, {
				pageInTab : pageInTab
			});
		}
	</script>

</body>
</html>
